﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BusinessLayer.Model.Entities
{
    /// <summary>
    /// Entidad que representa una foto
    /// </summary>
    public class Picture
    {
        /// <summary>
        /// Id de la foto
        /// </summary>
        public Guid PictureID { get; internal set; }

        /// <summary>
        /// Ruta del archivo de la foto
        /// </summary>
        public byte[] Image { get; set; }

        /// <summary>
        /// Descripcion de la foto
        /// </summary>
        public string Description { get; set; }

        /// <summary>
        /// Categoria a la que pertenece la foto
        /// </summary>
        public string Category { get; set; }

        /// <summary>
        /// Extension del archivo
        /// </summary>
        public string Extension { get; set; }

        /// <summary>
        /// Constructor
        /// </summary>
        public Picture()
        {
            this.PictureID = Guid.NewGuid();
            this.Description = String.Empty;
            this.Category = String.Empty;
            this.Extension = String.Empty;
        }

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="description">Descripción de la foto</param>
        /// <param name="image">imagen</param>
        /// <param name="category">Categoría de la foto</param>
        public Picture(byte[] image, string description, string category)
        {
            this.PictureID = Guid.NewGuid();
            this.Image = image;
            this.Description = description;
            this.Category = category;
            this.Extension = String.Empty;
        }
    }
}
